<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<!-- 
	Copyright (C) 2007, 2008, 2009, 2010, 2011. PARP Research Group.
	<http://perception.inf.um.es>
	University of Murcia, Spain.

	This file is part of the QVision library.

	QVision is free software: you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as
	published by the Free Software Foundation, version 3 of the License.

	QVision is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with QVision. If not, see <http://www.gnu.org/licenses/>.
-->

<html><head><meta http-equiv="content-Type" content="text/html;charset=UTF-8">
<title>QVision: Qt&#39;s Image, Video and Computer Vision Library</title>
<meta name="title" content="QVision" />
<meta name="dc.title" content="QVision" />
<meta name="url" content="http://perception.inf.um.es/QVision" />
<meta name="author" content="PARP Research Group - http://perception.inf.um.es" />
<meta name="revisit-after" content="30 DAYS"/>
<meta name="robots" content="index,follow"/>
<meta name="classification" content="*">
<meta name="rating" content="Safe For Kids">
<meta name="distribution" content="GLOBAL"/>
<meta name="description" content="Qt's Image, Video and Computer Vision Library"/>
<meta name="page-topic" content="Computer Vision research and prototype programming"/>
<meta name="geo.country" content="ES" />

<!--
Keywords:
By license:		open source, gnu, lgpl, gpl, free
By theme:		computer vision, image processing, robotics, programming, source, development
By usage:		library, toolkit, framework, prototype, application
By programming specs:	object oriented, c++, block programming, reusability, gui, graphical, parallel computing, high performance, GPU, prototyping
Interoperability with:	Qt, GSL, GNU Scientific library, OpenCV, CGAL, QWT, CUDA, mplayer, IPP, Intel Image Performance Primitives, blas, lapack
Functionallity:		image features, matrix algebra, projective geometry, mser, function minimization, function optimization, canny operator, harris operator, corner detection, performance evaluation, cpu usage, graphical interface
Main data-types:	matrix, vector, tensor, quaternion, image, polyline
Video sources:		webcam, camera, stream
Devices:		embedded, desktop computer, laptop, mini-laptop
Authors:		PARP research group. University of Murcia, Spain.
-->

<meta name="keywords" content="augmented reality, sfm, structure from motion, open source, gnu, lgpl, gpl, free, computer vision, image processing, robotics, programming, source, development, library, toolkit, framework, prototype, application, object oriented, c++, block programming, reusability, gui, graphical, parallel computing, high performance, GPU, prototyping, Qt, GSL, GNU Scientific library, OpenCV, CGAL, QWT, CUDA, mplayer, IPP, Intel Image Performance Primitives, blas, lapack, image features, matrix algebra, projective geometry, mser, function minimization, function optimization, canny operator, harris operator, corner detection, performance evaluation, cpu usage, graphical interface, matrix, vector, tensor, quaternion, image, polyline, webcam, camera, stream, embedded, desktop computer, laptop, mini-laptop, University of Murcia, Spain, PARP research group, vision por computador"/>
<meta http-equiv="keywords" content="augmented reality, sfm, structure from motion, open source, gnu, lgpl, gpl, free, computer vision, image processing, robotics, programming, source, development, library, toolkit, framework, prototype, application, object oriented, c++, block programming, reusability, gui, graphical, parallel computing, high performance, GPU, prototyping, Qt, GSL, GNU Scientific library, OpenCV, CGAL, QWT, CUDA, mplayer, IPP, Intel Image Performance Primitives, blas, lapack, image features, matrix algebra, projective geometry, mser, function minimization, function optimization, canny operator, harris operator, corner detection, performance evaluation, cpu usage, graphical interface, matrix, vector, tensor, quaternion, image, polyline, webcam, camera, stream, embedded, desktop computer, laptop, mini-laptop, University of Murcia, Spain, PARP research group, vision por computador"/>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="title" content="QVision"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="favicon.ico" />
</head><body>

<table width="100%"><tr>
	<td><a href="http://perception.inf.um.es/"><img src="parp.png" border="0" /> <big>PARP Research Group</big></a></td>
	<td align="right"><a href="http://www.um.es/"><big>Universidad de Murcia</big> <img src="um.png" border="0" /></a></td>
</tr></table>

<hr /><br />

<table width="95%" align="center"><tr><td>

<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
          <form id="FSearchBox" action="search.php" method="get">
            <img id="MSearchSelect" src="search/search.png" alt=""/>
            <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                   onfocus="searchBox.OnSearchFieldFocus(true)" 
                   onblur="searchBox.OnSearchFieldFocus(false)"/>
          </form>
        </div>
      </li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>GPU-KLT+FLOW wrapper functions and classes<br/>
<small>
[<a class="el" href="group__qvip.html">Image processing</a>]</small>
</h1>
<p>Wrapper classes and functions for the GPU-KLT+FLOW software.  
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQVKLTFeatureTracking.html">QVKLTFeatureTracking</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class to store the successive positions of an individual feature tracked in a video sequence.  <a href="classQVKLTFeatureTracking.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQVTrackingManager.html">QVTrackingManager</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class to manage trackings of features in video sequences.  <a href="classQVTrackingManager.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQVKLTTrackerFeature.html">QVKLTTrackerFeature</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Image feature location used by the GPU-KLT tracker.  <a href="classQVKLTTrackerFeature.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classQVKLTTracker.html">QVKLTTracker</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Wrapper class to perform image feature tracking with the GPU-KLT library.  <a href="classQVKLTTracker.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qvgpukltflow.html#ga38afdbedccfb1b2fafd6785902644512">qvInitFlowGPU</a> (TVL1_FlowEstimator *&amp;flowEstimator, int width, int height, int nLevels, int nIterations, int nOuterIterations, double lambda, double tau, double theta)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Initialize the dense flow estimator.  <a href="#ga38afdbedccfb1b2fafd6785902644512"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qvgpukltflow.html#ga37213de8a554819178f0de47e43c1dd1">qvOpticalFlowGPU</a> (TVL1_FlowEstimator *flowEstimator, QVPyramid *p1, QVPyramid *p2, <a class="el" href="classQVImage.html">QVImage</a>&lt; sFloat, 1 &gt; &amp;x, <a class="el" href="classQVImage.html">QVImage</a>&lt; sFloat, 1 &gt; &amp;y)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compute dense optical flow between two images.  <a href="#ga37213de8a554819178f0de47e43c1dd1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qvgpukltflow.html#ga7227b88d694ac15aeea6faf5dfcb4bcf">initShadersEnvironment</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Inits the environment variables for the GPU-KLT library functions.  <a href="#ga7227b88d694ac15aeea6faf5dfcb4bcf"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__qvgpukltflow.html#gad3fbbcf341a621b414ef2af81a6b0f26">InitGLEWCg</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Init GLEW and CG system.  <a href="#gad3fbbcf341a621b414ef2af81a6b0f26"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Wrapper classes and functions for the GPU-KLT+FLOW software. </p>
<p><a href="http://www.inf.ethz.ch/personal/chzach/opensource.html">GPU-KLT+FLOW</a> is a software that performs real-time KLT feature tracking and optical flow using GPU hardware. You can enable the QVision compatibility with this software in the <em>config.pri</em> file. The QVision offers classes and functions that wrap most of the functionality from the GPU-KLT+FLOW software.</p>
<p>In section <a class="el" href="group__GPUKLTFLOWExamplePrograms.html">GPU-KLT+FLOW example programs.</a> you can find some example applications that use these wrapper functions to perform KLT feature tracking and optical flow. </p>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga38afdbedccfb1b2fafd6785902644512"></a><!-- doxytag: member="qvopticalflow.h::qvInitFlowGPU" ref="ga38afdbedccfb1b2fafd6785902644512" args="(TVL1_FlowEstimator *&amp;flowEstimator, int width, int height, int nLevels, int nIterations, int nOuterIterations, double lambda, double tau, double theta)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qvInitFlowGPU </td>
          <td>(</td>
          <td class="paramtype">TVL1_FlowEstimator *&amp;&nbsp;</td>
          <td class="paramname"> <em>flowEstimator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>nLevels</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>nIterations</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>nOuterIterations</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>lambda</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>tau</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>theta</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize the dense flow estimator. </p>
<p>This function creates and configures the dense flow estimator with the configuration parameters below. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>flowEstimator</em>&nbsp;</td><td>Dense flow estimator. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>width</em>&nbsp;</td><td>Number of columns of the images. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>height</em>&nbsp;</td><td>Number of rows of the images. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nLeves</em>&nbsp;</td><td>Number of levels of the image pyramids. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nIterations</em>&nbsp;</td><td>Number of inner iterations of the algorithm </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nOuterIterations</em>&nbsp;</td><td>Number of outer iterations of the algorithm </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>lambda</em>&nbsp;</td><td>Parameter lambda </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>tau</em>&nbsp;</td><td>Parameter tau </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>theta</em>&nbsp;</td><td>Parameter theta </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="qvopticalflow_8cpp_source.html#l00027">27</a> of file <a class="el" href="qvopticalflow_8cpp_source.html">qvopticalflow.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ga37213de8a554819178f0de47e43c1dd1"></a><!-- doxytag: member="qvopticalflow.h::qvOpticalFlowGPU" ref="ga37213de8a554819178f0de47e43c1dd1" args="(TVL1_FlowEstimator *flowEstimator, QVPyramid *p1, QVPyramid *p2, QVImage&lt; sFloat, 1 &gt; &amp;x, QVImage&lt; sFloat, 1 &gt; &amp;y)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void qvOpticalFlowGPU </td>
          <td>(</td>
          <td class="paramtype">TVL1_FlowEstimator *&nbsp;</td>
          <td class="paramname"> <em>flowEstimator</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QVPyramid *&nbsp;</td>
          <td class="paramname"> <em>p1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QVPyramid *&nbsp;</td>
          <td class="paramname"> <em>p2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classQVImage.html">QVImage</a>&lt; sFloat, 1 &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classQVImage.html">QVImage</a>&lt; sFloat, 1 &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>y</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compute dense optical flow between two images. </p>
<p>This function computes dense optical flow between two images, using a preconfigured flow estimator. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>flowEstimator</em>&nbsp;</td><td>Dense flow estimator created and configured. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>leftPyramid</em>&nbsp;</td><td>Image pyramid of the first image </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>rightPyramid</em>&nbsp;</td><td>Image pyramid of the second image </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>x</em>&nbsp;</td><td>Image with x-coordenate of the flow vector for each pixel </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>y</em>&nbsp;</td><td>Image with y-coordenate of the flow vector for each pixel </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="qvopticalflow_8cpp_source.html#l00042">42</a> of file <a class="el" href="qvopticalflow_8cpp_source.html">qvopticalflow.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ga7227b88d694ac15aeea6faf5dfcb4bcf"></a><!-- doxytag: member="qvgpukltflow.h::initShadersEnvironment" ref="ga7227b88d694ac15aeea6faf5dfcb4bcf" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void initShadersEnvironment </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Inits the environment variables for the GPU-KLT library functions. </p>
<p>This function should be called in the <em>main</em> function, to set the path for the shader source files, specified at the 'config.pri' file. </p>

<p>Definition at line <a class="el" href="qvgpukltflow_8cpp_source.html#l00029">29</a> of file <a class="el" href="qvgpukltflow_8cpp_source.html">qvgpukltflow.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="gad3fbbcf341a621b414ef2af81a6b0f26"></a><!-- doxytag: member="qvgpukltflow.h::InitGLEWCg" ref="gad3fbbcf341a621b414ef2af81a6b0f26" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void InitGLEWCg </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Init GLEW and CG system. </p>
<p>This function should be called just once before any call to the GPU-KLT+FLOW wrapper functions from the thread that will use them, to set up the GPU context. </p>

<p>Definition at line <a class="el" href="qvgpukltflow_8cpp_source.html#l00041">41</a> of file <a class="el" href="qvgpukltflow_8cpp_source.html">qvgpukltflow.cpp</a>.</p>

</div>
</div>
</div>
</td></tr></table>

<br /><hr><br />
<center><a href="http://perception.inf.um.es/QVision">QVision framework</a>.
<a href="http://perception.inf.um.es">PARP research group</a>.
Copyright &copy; 2007, 2008, 2009, 2010, 2011.</center>
<br />
</body>
</html>
